		<?php // FEATURED POSTS ?>
		<?php 
		$theme_options = get_option('po_theme'); 
		$cat = $theme_options['featured_cat'];
		$qty = $theme_options['featured_qty'];
		if ($theme_options['featured_sort']=="rand") {$r = 'orderby=rand';}
		$size = $theme_options['featured_thumbs_size'];
		$width = $size + 7;
		$rot = $theme_options['featured_thumbs_rotation'];
		?>
		<div id="feat-posts">
			<?php query_posts("cat=$cat&showposts=$qty&$r");
				while (have_posts()) : the_post(); ?>
				<?php
					$deg = rand(-20,20);
					if ($rot=="yes") {$rotation = "-moz-transform:rotate(".$deg."deg); -webkit-transform:rotate(".$deg."deg); -o-transform: rotate(".$deg."deg);";}; 
					if ($size == 240) {$top = rand(0,110); $left = rand(0,700);} else {$top = rand(0,280); $left = rand(0,830);};
					$image2 = get_post_meta($post->ID, 'full_image_value', true);
					$exc = get_the_excerpt();
					preg_replace ('<p>','',$exc);
					//CHECK IMAGE POST
					if ($image2) { ?>
					<div class="featpic" style="width:<?php echo $width ?>px; <?php echo $rotation ?> top:<?php echo $top ?>px; left:<?php echo $left ?>px;"><img class="pic" src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $image2 ?>&w=<?php echo $size ?>&zc=1&q=90" alt="" /><a rel="prettyPhoto[my_gallery]" title="<?php echo $exc ?> &lt;a class=&quot;ico_arrow&quot; href=&quot;<?php the_permalink() ?>&quot;&gt;Read More&lt;/a&gt;" href="<?php echo $image2 ?>"><img src="<?php bloginfo('template_directory'); ?>/images/zero.gif" width="<?php echo $size ?>" alt="<?php the_title(); ?>"/></a></div><?php }
					//CHECK AUTOMATIC THUMB
					elseif (catch_that_image()<>"") { ?>
					<div class="featpic" style="width:<?php echo $width ?>px; <?php echo $rotation ?> top:<?php echo $top ?>px; left:<?php echo $left ?>px;"><img class="pic" src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo catch_that_image() ?>&w=<?php echo $size ?>&zc=1&q=90" alt="" /><a rel="prettyPhoto[my_gallery]" title="<?php echo $exc ?> &lt;a class=&quot;ico_arrow&quot; href=&quot;<?php the_permalink() ?>&quot;&gt;Read More&lt;/a&gt;" href="<?php echo catch_that_image() ?>"><img src="<?php bloginfo('template_directory'); ?>/images/zero.gif" width="<?php echo $size ?>" alt="<?php the_title(); ?>"/></a></div><?php }
					// ELSE DEFAULT
					else { ?><div class="featpic" style="width:<?php echo $width ?>px; <?php echo $rotation ?> top:<?php echo $top ?>px; left:<?php echo $left ?>px;"><img class="pic" src="<?php bloginfo('template_directory'); ?>/images/blog-thumb-<?php echo $size ?>x<?php echo $size ?>.jpg" alt=""/><a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_directory'); ?>/images/zero.gif" width="<?php echo $size ?>" height="<?php echo $size ?>" alt="<?php the_title(); ?>"/></a></div><?php ;}
				endwhile; wp_reset_query();
			?>
		</div>
		<div class="clear"><!-- --></div>